import { createRouter, createWebHashHistory } from 'vue-router'
import DefaultLayout from '@/layout/default.vue'

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    { path: '/', redirect: '/default/desk' },
    { path: '/:pathMatch(.*)', redirect: '/default/desk' },
    {
      path: '/default',
      name: 'default-layout',
      component: DefaultLayout,
      children: [
        {
          path: '/default/desk',
          name: 'defaultDesk',
          component: () => import('@/views/desk/desk.vue')
        },
        {
          path: '/default/expand',
          name: 'defaultExpand',
          component: () => import('@/views/desk/desk.vue')
        }
      ]
    }
  ]
})

export default router
